/*    */ package com.newcrm.webapi.sub;
/*    */ 
/*    */ import com.newcrm.bean.User;
/*    */ import com.newcrm.db.DealManager;
/*    */ import com.newcrm.exception.DBException;
/*    */ import com.newcrm.exception.NotFoundException;
/*    */ import com.newcrm.util.Util;
/*    */ import com.newcrm.webapi.AbstractAction;
/*    */ import com.newcrm.webapi.AbstractHttpServlet;
/*    */ import java.io.IOException;
/*    */ import java.sql.SQLException;
/*    */ import javax.servlet.ServletException;
/*    */ import javax.servlet.http.HttpServletRequest;
/*    */ import javax.servlet.http.HttpServletResponse;
/*    */ 
/*    */ public class UpdateDealNote extends AbstractAction
/*    */ {
/* 20 */   private int id = 0;
/*    */ 
/*    */   public UpdateDealNote(AbstractHttpServlet servlet) {
/* 23 */     super(servlet);
/*    */   }
/*    */ 
/*    */   public UpdateDealNote(AbstractHttpServlet servlet, String id) {
/* 27 */     super(servlet);
/* 28 */     this.id = Util.str2Int(id);
/*    */   }
/*    */ 
/*    */   public void parse(HttpServletRequest request, HttpServletResponse response)
/*    */     throws IOException, ServletException, NotFoundException
/*    */   {
/* 35 */     DealManager manager = new DealManager();
/* 36 */     String background = Util.getURLParameter(request
/* 37 */       .getParameter("background"));
/*    */ 
/* 39 */     User loginUser = super.getLoginUser(request);
/*    */     try {
/* 41 */       manager.updateDealNote(this.id, background, loginUser.userId);
/*    */     }
/*    */     catch (DBException e) {
/* 44 */       e.printStackTrace();
/*    */     }
/*    */     catch (SQLException e) {
/* 47 */       e.printStackTrace();
/*    */     }
/* 49 */     response.sendRedirect(request.getContextPath() + "/deals/" + 
/* 50 */       String.valueOf(this.id));
/*    */   }
/*    */ }

/* Location:           C:\E\referenceProject\CRM参考\qikebao\WEB-INF\lib\qikebao.jar
 * Qualified Name:     com.newcrm.webapi.sub.UpdateDealNote
 * JD-Core Version:    0.6.1
 */